﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO {
    public class product_activity_time_buy_dto {

        /// <summary>
        /// 活动产品Id
        /// </summary>
        public long product_activity_id { get; set; }

        /// <summary>
        /// 结算价
        /// </summary>
        public decimal cost_price { get; set; }

        /// <summary>
        /// 每单最小购买数（件）
        /// </summary>
        public int min_buy_mum { get; set; }

        /// <summary>
        /// 每单最大购买数（次）
        /// </summary>
        public int max_buy_num { get; set; }

        /// <summary>
        /// 马力数量
        /// </summary>
        public int horse_power { get; set; }

        /// <summary>
        /// 马力有效时间（天）,为空则为永久马力
        /// </summary>
        public int? horse_power_effective { get; set; }

        /// <summary>
        /// 活动产品
        /// </summary>
        [JsonIgnore]//解决Json解析时循环依赖的Bug
        public product_activity_dto product_activity { get; set; }


    }

    public class product_activity_time_buy_edit {

        public List<product_activity_time_buy_edit_model> list { get; set; }

        public activity_dto activity { get; set; }
    }

    public class product_activity_time_buy_edit_model {
        /// <summary>
        /// 活动Id
        /// </summary>
        public long activity_id { get; set; }
        /// <summary>
        /// 活动产品Id
        /// </summary>
        public long product_activity_id { get; set; }
        /// <summary>
        /// 产品Id
        /// </summary>
        public long product_id { get; set; }
        /// <summary>
        /// 产品SkuId
        /// </summary>
        public long product_sku_id { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string product_name { get; set; }

        /// <summary>
        /// 产品规格名称
        /// </summary>
        public string product_sku_name { get; set; }

        /// <summary>
        /// 产品价格
        /// </summary>
        public decimal product_price { get; set; }

        /// <summary>
        /// 活动价格
        /// </summary>
        public decimal activity_price { get; set; }

        /// <summary>
        /// 活动价格红钻部分
        /// </summary>
        public decimal activity_red_drill { get; set; }

        /// <summary>
        /// 活动结算价
        /// </summary>
        public decimal cost_price { get; set; }

        /// <summary>
        /// 产品原结算价
        /// </summary>
        public decimal raw_cost_price { get; set; }

        /// <summary>
        /// 分销比例
        /// </summary>
        public decimal distribution_rate { get; set; }

        /// <summary>
        /// 活动库存
        /// </summary>
        public int activity_stock { get; set; }

        /// <summary>
        /// 每单最小购买数（件）
        /// </summary>
        public int min_buy_mum { get; set; }

        /// <summary>
        /// 每单最大购买数（次）
        /// </summary>
        public int max_buy_num { get; set; }

        /// <summary>
        /// 马力数量（个）
        /// </summary>
        public int horse_power { get; set; }

        /// <summary>
        /// 马力有效时间（天）,为空则为永久马力
        /// </summary>
        public int? horse_power_effective { get; set; }

        /// <summary>
        /// 是否售尽
        /// </summary>
        public bool is_sold_out { get; set; }

        /// <summary>
        /// 销售数量
        /// </summary>
        public int sale_count { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int top { get; set; }
    }
}
